﻿package com.firewolf.state.states;

import com.firewolf.state.context.GumballMachine;

/**
 * 没钱的状态
 * @author Administrator
 *
 */
public class NoMoneyState implements IState {
	
	private GumballMachine gumballMachine;
	
	public NoMoneyState(GumballMachine gumballMachine) {
		this.gumballMachine = gumballMachine;
	}
	
	@Override
	public void insert25tMoney() {
		System.out.println("你投币了-----");
		gumballMachine.setState(gumballMachine.getHasMoneyState());
	}

	@Override
	public void ejectMoney() {
		System.out.println("对不起，因为你没有投币，所以不能退钱！");
	}

	@Override
	public void turnCrank() {
		System.out.println("你转动了曲柄，但是你没有投币！");
	}

	@Override
	public void dispense() {
		System.out.println("你必须先付钱我们才能发放糖果，谢谢！");
	}

}
